import request from '@/utils/request'

export function getOrgByPage(data) {
  return request({
    url: '/info/infoorgan_search',
    method: 'post',
    data,
  })
}

export function createOrg(data) {
  return request({
    url: '/info/infoorgan_save',
    method: 'post',
    data,
  })
}

export function updateOrg(data) {
  return request({
    url: '/info/infoorgan_update',
    method: 'post',
    data,
  })
}

export function deleteOrg(id) {
  return request({
    url: '/info/infoorgan_delete',
    method: 'get',
    params: {
      id,
    },
  })
}

export function deleteOrgByIds(ids) {
  return request({
    url: '/info/infoorgan_deletebyids',
    method: 'get',
    params: {
      ids,
    },
  })
}

export function disableOrg(data) {
  return request({
    url: '/sys/sysorgan_disable',
    method: 'post',
    data,
  })
}
